/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package clases;

/**
 *
 * @author MARTIN
 */

public class Validacion {
    String cp="|:°!#$%&/()=?¡¿'{}[],.-_*<>@";
    String cc="|:°!#$%&/()=?¡¿'{}[],*<>";
    
    public int validarinfo(String chain) {        
        int v=0;
        //System.out.println(chain.charAt(3) + "" + cp);
        for(int i=0; i<chain.length();i++){
            for(int c=0; c<cp.length();c++ ){
                if(cp.charAt(c)==chain.charAt(i)){
                    System.out.println("caracter invalido"); 
                    v++;
                }               
            }
        }
        return v;
    }
    public int validarcorreo(String chain) {        
        int v=0;
        //System.out.println(chain.charAt(3) + "" + cc);
        for(int i=0; i<chain.length();i++){
            for(int c=0; c<cc.length();c++ ){
                if(cc.charAt(c)==chain.charAt(i)){
                    System.out.println("caracter invalido"); 
                    v++;
                }               
            }
        }
        return v;
    }
    public static void main(String[] args){
        Validacion val = new Validacion();              
        System.out.println(val.validarinfo("h.ola/*-°"));
    }
}
